<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./vue.js"></script>
</head>

<body>
    <div id="app">
        <p>
            你要找
            <input type="radio" :checked="friend.includes('男朋友')" @change="radioChange" value="男朋友">男朋友
            <input type="radio" :checked="friend.includes('女朋友')" @change="radioChange" value="女朋友">女朋友
            <div style="color: red;">
                {{friend}}
            </div>
        </p>
    </div>
    <script>
        const app = new Vue({
            el: '#app',
            data: {
                friend: '女朋友'
            },
            methods: {
                radioChange(e) {
                    this.friend = e.target.value
                }
            }
        })
    </script>
</body>

</html>